An Adaptive Background Modeling Method For Foreground Segmentation